<template>
  <div>
    <div class="row">
      <div class="col-sm-6">
        <div>Juejin1</div>
        <table class="table table-striped">
          <thead>
          <tr>
            <th width="40">img</th>
            <th>title</th>
          </tr>
          </thead>
          <tbody>
          <tr v-for="item in list">
            <td><img :src="item.icon" width="30" height="30"></td>
            <td>
              {{item.title}} {{item.match_date1}}<br>
              <small style="color:#a8a8a8">{{item.description}}</small>
            </td>
          </tr>
          </tbody>
        </table>
      </div>
      <div class="col-sm-6">
        <div>Juejin2</div>
        <table class="table table-striped">
          <thead>
          <tr>
            <th width="40">img</th>
            <th>title</th>
          </tr>
          </thead>
          <tbody>
          <tr v-for="item in juejinList">
            <td><img :src="item.img" width="30" height="30"></td>
            <td>
              {{item.title}} <small style="color:#218ff2">{{item.userData.company}}</small><br>
              <small style="color:#a8a8a8">{{item.desc}}</small>
            </td>
          </tr>
          </tbody>
        </table>
      </div>
    </div>


  </div>
</template>

<script>
export default {
  data () {
    return {
      list:[],
      juejinList:[],
    }
  },
  components: {
  },
  async asyncData({$axios}){

    let [juejin1, juejin2] = await Promise.all([
      $axios.get(`/juejin1/v1/topicList/recommend?uid=&device_id=&token=&src=web`),
      $axios.get(`/juejin2/v1/getListByLastTime?uid=&client_id=&token=&src=web&pageNum=1`)
    ])

    return {
      list: juejin1.d.list,
      juejinList: juejin2.d,
    }


  },
  head () {
    return {
      title: 'Score SSR',
      meta:
        [
          {hid:'keywords', name: 'keywords', content: `无限宝石,无限元宝`},
          {hid:'description', name: 'description', content: `无限宝石,无限元宝`},
        ]
    }
  },
  mounted (){

  },
  methods:{

  },
}
</script>

<style>

</style>
